//
//  ZCHotFootView.m
//  zctx
//
//  Created by apple on 16/4/14.
//  Copyright © 2016年 sanliang. All rights reserved.
//

#import "ZCHotFootView.h"



@implementation ZCHotFootView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.delBtn];
        [self.delBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.left).with.offset(0);
            make.right.equalTo(self.right).with.offset(0);
            make.top.equalTo(self.top).with.offset(0);
            make.bottom.equalTo(self.bottom).with.offset(0);
        }];
    }
    return self;
}

-(void)deleteAllBtnClicks{
    NSLog(@"1111");
    self.hotBlock();
}

-(UIButton *)delBtn{
    if (!_delBtn) {
        _delBtn = [[UIButton alloc]initWithFrame:CGRectZero];
        _delBtn.titleLabel.font = [UIFont systemFontOfSize:15];
        [_delBtn setTitle:@"清除搜索历史" forState:UIControlStateNormal];
        [_delBtn setTitleColor:[UIColor colorWithHexString:@"#8a8a8a"] forState:UIControlStateNormal];
        [_delBtn addTarget:self action:@selector(deleteAllBtnClicks) forControlEvents:UIControlEventTouchUpInside];
    }
    return _delBtn;
}

@end
